import { reactive } from 'vue'

const store = reactive({
  user: {
    id: null,
    username: '',
    role: ''
  },
  setUser(userData) {
    this.user = { ...userData }
  },
  clearUser() {
    this.user = {
      id: null,
      username: '',
      role: ''
    }
  }
})

export default store 